/*
 * JVM_CP.h
 *
 *  Created on: 02.01.2011
 *      Author: Tavin
 */

#ifndef JVM_CP_H_
#define JVM_CP_H_

/**
 * Constant Pool
 */
typedef struct{
	uint8_t type;
	uint8_t data[];

} __attribute__((__packed__)) JVM_CP_t;



#endif /* JVM_CP_H_ */

// Constant types
#define CONSTANT_TYPE_CLASS_INFO            7
#define CONSTANT_TYPE_FIELD_REF             9
#define CONSTANT_TYPE_METHOD_REF            10
#define CONSTANT_TYPE_INTERFACE_METHOD_REF 	11
#define CONSTANT_TYPE_STRING                8
#define CONSTANT_TYPE_INTEGER               3
#define CONSTANT_TYPE_FLOAT                 4
#define CONSTANT_TYPE_LONG                  5
#define CONSTANT_TYPE_DOUBLE                6
#define CONSTANT_TYPE_NAME_AND_TYPE         12
#define CONSTANT_TYPE_UTF8                  1
